|
Public Types
|
enum |
Direction {
eDirNormal,
eDirAveragedNormal,
eDirVertexNormal,
eDirForward,
eDirRight,
eDirX, eDirY,
eDirZ,
eDirCamera,
eDirScreen,
eDirXY, eDirXZ,
eDirYZ
} |
|
Values for the brush direction property.
Direction().
More...
|
enum |
Modifier { eModNormal,
eModAdditive,
eModInverted,
eModNoEffect
} |
|
Values for the brush effect modifier.
More...
|
enum |
TriggerType {
eTriggerPrimary,
eTriggerSecondary,
eTriggerTertiary
} |
|
This value represents how the user triggered
the brush. More...
|
enum |
MaskType { eMaskAny = -1,
eMaskStamp,
eMaskStencil,
eMaskTypeCount
} |
|
Values for mask types that can be add to the
brush effect as a multiplier. More...
|
Public Member Functions
|
virtual const mudbox::ClassDesc
* |
RuntimeClass (void)
const |
|
BrushOperation
(void) |
|
Constructor, do not use it directly.
|
virtual QString |
Name (const ClassDesc
*pClass=0) const |
|
Returns the name of the current brush
operation.
|
virtual void |
OnNodeEvent (const
Attribute
&cAttribute, NodeEventType eType) |
|
Overriding the node event.
|
virtual bool |
IsScreenSpace (void)
const |
|
Returns if the brush is in screen space.
|
virtual float |
BrushSize (void)
const |
|
Returns the size of the active brush.
|
virtual float |
BrushStrength (void)
const |
|
Returns the strength of the active brush.
|
virtual void |
SetBrushSize (float
fSize) |
|
Sets the size of the active brush.
|
virtual void |
SetBrushStrength
(float fStrength) |
|
Sets the strength of the active brush.
|
virtual float |
EffectiveBrushSize
(void) const |
|
Returns the size of the active brush
including the scaling parameter.
|
virtual float |
EffectiveBrushStrength
(void) const |
|
Returns the strength of the active brush
including the scaling parameter.
|
virtual float |
BrushSizeBias (void)
const |
|
Returns the size bias percentage.
|
virtual float |
BrushStrengthBias
(void) const |
|
Returns the strength bias percentage.
|
virtual float |
MaxBrushSize (void)
const |
|
Returns the maximal brush size.
|
virtual float |
MaxBrushStrength
(void) const |
|
Returns the maximal brush strength.
|
virtual bool |
UsesStrokeSmoothing
(void) const |
|
Returns true if the brush wants to use
drawing curve.
|
virtual float |
StrokeSmoothingDistance
(void) const |
|
Returns the distance parameter for smoothing
if the brush uses drawing curve.
|
virtual void |
SetStrokeSmoothing
(bool bEnable, float fDistance) |
|
Convenience function for setting Stroke
smoothing parameters.
|
virtual bool |
HasCustomCursor
(void) |
|
Returns true if the brush wants to draw the
cursor on it's own.
|
virtual bool |
UsesSteadyStroke
(void) const |
|
Returns true if the brush wants to use
drawing curve.
|
virtual float |
SteadyStrokeDistance
(void) const |
|
Returns the distance parameter for smoothing
if the brush uses drawing curve.
|
virtual void |
SetSteadyStroke
(bool bEnable, float fDistance) |
|
Convenience function for setting Stroke
smoothing parameters.
|
virtual const NURBSCurve * |
Falloff (void)
const |
|
Returns the falloff curve.
|
virtual void |
SetFalloff
(NURBSCurve *pCurve) |
|
Sets the falloff curve.
|
virtual const Store< float >
& |
FalloffData (void)
const |
|
Returns the current falloff table.
|
float |
FalloffValue (float
fValue) const |
|
Returns the falloff value in the specified
curve position.
|
virtual bool |
IsMaskEnabled
(MaskType
type=eMaskAny) const |
|
Returns true if the mask is turned on for
the brush.
|
virtual const Image * |
MaskImage (MaskType
type=eMaskAny) const |
|
Returns the current mask image.
|
virtual Matrix |
MaskMatrix
(MaskType
type=eMaskAny) const |
|
Returns the current matrix of the mask.
|
virtual bool |
IsMaskInverted
(MaskType
type=eMaskAny) const |
|
Returns whether the value should be inverted
or not (inversion means 1-x).
|
virtual float |
MaskFactor
(MaskType
type=eMaskAny) const |
|
Returns the factor value, which should be
multiplied to the mask value.
|
virtual bool |
IsMaskTiled
(MaskType
type=eMaskAny) const |
|
Returns true if the mask shall tile, and
false if all the values outside the mask should be treated as zero.
|
virtual QString |
MaskName (MaskType
type=eMaskAny) const |
|
Returns a string identifier which is unique
for this mask.
|
virtual bool |
MaskBuildUp
(MaskType
type=eMaskAny) const |
|
Returns true if the mask should be included
in buildup or not.
|
virtual const Image * |
MaskOpacityImage
(MaskType
type=eMaskAny) const |
|
Returns the effective area of the mask as an
image. Use this to restrict the mask effect to certain pixels.
|
virtual void |
OnMaskChanged
(MaskType
type=eMaskAny) |
|
Called by the kernel when the active stamp
or stencil is changed on the UI. Override if you want to be
notified when this happens.
|
virtual float |
BuildUpRate (void)
const |
|
Returns the current build up rate (between 0
and 1).
|
virtual bool |
PatchesAtRelease
(void) const |
|
Returns if the patchs should be applied at
the end of stroke.
|
virtual bool |
PressureControlsBrushSize
(void) const |
|
Returns if the pressure affects brush size.
|
virtual bool |
PressureControlsBrushStrength
(void) const |
|
Returns if the pressure affects brush
strength.
|
virtual bool |
IsInverted (void)
const |
|
Returns the mode if inverted or not.
|
virtual bool |
IsOrientedToSurface
(void) const |
|
Returns if the brush is aligned to the
surface.
|
Direction |
Direction (void)
const |
|
Returns the direction type.
|
Vector |
DirectionVector
(unsigned int iVertexIndex) const |
|
Returns the direction which whould be used
for the brush. If the returned value is a zero length vector, then
the brush has to calculate its own averaged normal direction.
|
virtual void |
SetDirectionVector
(const Vector
&vDirection) const |
|
When the current direction is calculated
properly, the operation may want to call this routine to use the
direction for the stamp transformation.
|
Vector |
PreviousPatchPosition
(void) const |
|
Return the local position of the previous
patch in this stroke.
|
virtual void |
BeginStroke
(Mesh *pMesh,
Modifier eModifier,
TriggerType
eTriggerType) |
|
Called when a new stroke is started.
|
virtual void |
EndStroke
(void) |
|
Called when a stroke is finished.
|
virtual void |
MouseMove (float
fXPosition, float fYPosition, float fXDelta, float fYDelta,
AxisAlignedBoundingBox
&cDirtyWorldArea) |
|
Called when the mouse is moved during a
stroke. The default implementation calls AddPatch().
Positions are in range [0,1].
|
virtual void |
AddPatch (const
SurfacePoint *pPoint,
const Vector
&vPatchCenter, float fSize, float fPressure, float fStrength,
AxisAlignedBoundingBox
&cDirtyWorldArea) |
|
Called when a new surface point has to be
added to the stroke.
|
virtual void |
Flood (Mesh *pTarget, float
fStrength=1.0f, bool bFromCamera=false) |
|
Flood a mesh with the effect of the brush.
|
virtual void |
SetActiveConfiguration
(BrushConfiguration
*config) |
|
Changes to the configuration.
|
virtual void |
SetActiveConfiguration
(const QString &sName) |
|
Changes to the configuration.
|
virtual BrushConfiguration
* |
ActiveConfiguration
(void) const |
|
Returns the active configuration.
|
const StampConfiguration
& |
StampConfig (void)
const |
|
Returns the structure with stamp properties.
|
void |
SetStampConfig
(StampConfiguration
&newConfig) |
|
Sets stamp configuration.
|
void |
SetStamp (bool
bEnable, const QString &sFileName="") |
|
Convenience method for enabling stamp and
setting stamp image.
|
void |
SetBrushSizeScale
(float fScale) |
|
Set the scale amount of size according to
the brush configuration.
|
void |
SetBrushStrengthScale
(float fScale) |
|
Set the scale amount of strength according
to the brush configuration.
|
bool |
UsesGlobalBrushSize
(void) const |
|
Returns if the brush uses the global size.
|
const MirrorConfiguration
& |
MirrorConfig (void)
const |
|
Returns the mirror configuration.
|
void |
SetMirrorConfig
(MirrorConfiguration
newConfig) |
|
Sets mirror configuration.
|
virtual bool |
IsConfigurationInited
(BrushConfiguration
*config) const |
|
Returns if we already initialized the
configuration with the default values.
|
virtual void |
StoreConfiguration
(BrushConfiguration
*config) |
|
Saves the configuration state (the attribute
values) into memory The parameter is the configuration index
defined in the config declaration.
|
virtual void |
RestoreConfiguration
(BrushConfiguration
*config) |
|
Reloads the configuration state from the
saved buffer so it restores the same state when it was active last
time.
|
virtual QString |
OverlayIcon
(void) |
|
Returns the file name to be displayed as an
overlay icon above the cursor.
|
virtual QPointF |
OverlayOffset
(void) |
|
Returns an (x, y) offset relative to the
mouse cursor where the icon should be displayed.
|
virtual bool |
ExecuteAndInvert
(void) |
|
For storing and restoring undo/redo data.
|
virtual void |
Serialize (Stream &s) |
|
Serializing.
|
virtual BrushOperation
& |
operator= (const
BrushOperation
&op) |
|
Value assignment operator.
|
virtual bool |
CanLockLayer (void)
const |
|
Returns if using the brush will lock the
active layer to the current subdivision level so it cannot be
modified on other levels later.
|
Static Public Member Functions
|
const mudbox::ClassDesc
* |
StaticClass
(void) |
mudbox::Node
* |
CreateInstances
(unsigned int iCount=1) |
void |
AddConfiguration
(BrushConfiguration
*config) |
|
Add a new configuration.
|
unsigned int |
ConfigurationCount
(void) |
|
Returns the number of configurations.
|
BrushConfiguration
* |
Configuration
(unsigned int iIndex) |
|
Returns a configuration.
|
void |
SerializeConfigurationStates
(Stream
&s) |
|
Saves/loads the current states of the
brushes to/from the given stream.
|
Protected Attributes
|
abool |
m_bScreenSpace |
|
ATTRIBUTES:.
|
abool |
m_bInverted |
abool |
m_bOrientToSurface |
afloatr |
m_fNormalBrushSize |
afloatr |
m_fNormalBrushStrength |
afloatr |
m_fScreenBrushSize |
afloatr |
m_fScreenBrushStrength |
afloatr |
m_fMaxBrushSize |
afloatr |
m_fMaxBrushStrength |
afloatr |
m_fBrushSizeBias |
afloatr |
m_fBrushStrengthBias |
acheckablefloat |
m_fStrokeSmoothing |
acheckablefloat |
m_fSteadyStroke |
abool |
m_bRememberSize |
aenum |
m_iDirection |
astampcfg |
m_cStampCfg |
amirrorcfg |
m_cMirrorCfg |
aevent |
m_cFlood |
avoid |
m_vPressure |
acurveptr |
m_cFalloff |
Modifier |
m_eModifier |
TriggerType |
m_eTriggerType |
float |
m_fBrushSizeScale |
float |
m_fBrushStrengthScale |
BrushConfiguration
* |
m_pActiveConfiguration |
mudbox::BrushOperation
mudbox::BrushOperation mudbox::BrushOperation
mudbox::BrushOperation mudbox::BrushOperation
mudbox::BrushOperation mudbox::BrushOperation
mudbox::BrushOperation mudbox::BrushOperation
mudbox::BrushOperation
mudbox::BrushOperation
mudbox::BrushOperation mudbox::BrushOperation
mudbox::BrushOperation mudbox::BrushOperation
mudbox::BrushOperation mudbox::BrushOperation
mudbox::BrushOperation mudbox::BrushOperation
mudbox::BrushOperation